/**
 * Called before the form component is rendered.
 *
 * @param {JSRenderEvent} event the render event
 *
 * @properties={typeid:24,uuid:"8E78F38E-2B64-45E5-813C-7FFB71CFB991"}
 */
function onRenderImagen(event) {
	/** @type {JSRecord<db:/fwk_navigation_infocom/favoritos_usuario>}*/
	var $rcd = event.getRecord()
	if ($rcd)
		event.getRenderable().imageURL = $rcd.favoritos_usuario_to_pantallas.url_boton
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"CD333FCA-B07C-4B7B-83E5-935D3104C44E"}
 * @AllowToRunInFind
 */
function onShow(firstShow, event) {
	controller.find()
	solucion_id = globals.gIdSolucion
	controller.search()
	controller.sort('orden_aparicion asc')
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"C12BEF7D-8085-4B73-9AC7-F52B8D1581A7"}
 */
function borrar(event) {
	controller.deleteRecord()
}

/**
 * Handle changed data.
 *
 * @param {Number} oldValue old value
 * @param {Number} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"A5F36B67-7341-41FE-83E3-B13473C0480C"}
 */
function onDataChangeOrden(oldValue, newValue, event) {
	controller.sort('orden_aparicion asc')
	return true
}
